package com.zengqingfa.tx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @fileName: ServiceA
 * @author: zengqf3
 * @date: 2021-3-10 17:16
 * @description:
 */

public class ServiceA {

    @Resource
    private ServiceB serviceB;

    @Transactional
    public void a() throws Exception{
        try {
            serviceB.b();
        } catch (Exception ignore) {
            System.out.println("aaaa");
//            throw ignore;
        }
    }

}
